package com.lqg.bookLibrary.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author prodigal_lqg
 * @since 2023-04-09 
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("stock")
public class Stock implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 库存表id
     */
    @TableId("stock_id")
    private Long stockId;

    /**
     * 图书id
     */
    @TableField("book_id")
    private Long bookId;

    /**
     * 库存数量
     */
    @TableField("quantity")
    private Integer quantity;


    public Stock(Long bookId, Integer quantity) {
        this.bookId = bookId;
        this.quantity = quantity;
    }
}
